package com.ljw.community.mapper;

import com.ljw.community.entity.Tag;
import com.ljw.community.entity.User;
import com.ljw.community.service.SqlService;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TagMapper {

    //取出包括已删除的所有板块
    @Select(value = "select * from tag order by create_time desc limit ${start},${limit}")
    List<Tag> loadTagList(int start, int limit);

    @Insert(value = "insert into tag(id,tag_name,create_time,creator_id)" +
            "values(#{id},#{tagName},#{createTime},#{creatorId})")
    int insert(Tag tag);

    @Update(value = "update tag set del_flag = #{delFlag} where id = #{id}")
    int updateById(Tag tag);
}
